package org.ielse.frame.t.tz.parallax;

import static org.ielse.frame.t.tz.parallax.ParallaxContainer.LAYOUT_ID;

import java.util.ArrayList;
import java.util.List;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

public class ParallaxFragment extends Fragment {
	private final List<View> parallaxViews = new ArrayList<View>();

	@Override public View onCreateView(LayoutInflater original, ViewGroup container, Bundle savedInstanceState) {
		Bundle args = getArguments();
		int layoutId = args.getInt(LAYOUT_ID);

		ParallaxLayoutInflater inflater = new ParallaxLayoutInflater(original, getActivity(), this);

		return inflater.inflate(layoutId, null);
	}

	public List<View> getParallaxViews() {
		return parallaxViews;
	}
}
